package com.pwx.services.impl;

import com.pwx.dao.DeptMapper;
import com.pwx.entity.Dept;
import com.pwx.services.DeptServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Copyright (C),2021-2022,亚瑟王
 * FileName: DeptServicesImpl
 * Author: saber
 * Date:2022/10/4 15:40
 */
@Service
@Transactional
public class DeptServicesImpl implements DeptServices {
    @Autowired
    private DeptMapper dm;

    @Override
    @Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
    public List<Dept> getAll() {
        return dm.getAll();
    }
}
